package com.xyoto.community.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.HashMap;
import java.util.Map;

/**
 * 话题下的用户活跃表配置
 */
@PropertySource(value = "classpath:hot_dynamic_score.properties",encoding = "utf-8")
@ConfigurationProperties(prefix = "dynamic-hot-map")
@Configuration
@Getter
@Setter
public class DynamicHotOperateAddScoreConfig {

    /**
     * 维护操作类型到该类型增加的活跃度数关系
     */
    private Map<Integer, Double> operateTypeAddScoreMap = new HashMap<>();

    /**
     * 根据操作类型获取该操作对应增加的活跃度数
     * @param operateType 操作类型
     * @return 增加的活跃度数
     */
    public Double getDynamicIncreaseScoreByOperateType(Integer operateType){
        return operateTypeAddScoreMap.get(operateType);
    }

}



